<!---
	Title:		Elders Program Database
	Author:		Bruce Frick
	Purpose:	.
--->

<cfset BASE = CreateObject("component", "cfc.base") />
<cfparam name="url.ElderID" default="0">
<cfparam name="url.DailyProgressNoteID" default="-1">

<cfoutput>
<!---HTML header, css links, js links, and page title--->
#BASE.htmlHeader(
	"/jquery/ui-1.8.5/jquery-ui.min.js,
        js/dailyprogressnote.js",
	"css/style.css,
    	/jquery/ui-1.8.5/themes/base/jquery-ui.css",
    "Elders Program - Daily Progress Note",
    url.ElderID)#
<!---HTML header, css links, js links, and page title--->

<cfform id="myform" >

<cfset QUERIES.Notes = CreateObject("component", "cfc.queries").funcQrySelectDailyProgressNotesByElder(URL.ElderID, -1)/>
<cfset QUERIES.Note = CreateObject("component", "cfc.queries").funcQrySelectDailyProgressNotesByElder(-1, url.DailyProgressNoteID)/>
<cfset QUERIES.elder = CreateObject("component", "cfc.queries").funcQryGetIntakeByID(url.ElderID) />
<cfset UTILITIES = CreateObject("component", "cfc.utilities") />

<cfinput type="hidden" id="ElderID" name="ElderID" value="#url.ElderID#" />
<cfinput type="hidden" id="DailyProgressNoteID" name="DailyProgressNoteID" value="#url.DailyProgressNoteID#" />
<cfset SESSION.ElderID = URL.ElderID />

<table width="99%" cellpadding="2" cellspacing="2" id="daily_progress_note" >
	<tbody class="header_title">
        <tr>
            <td valign="top" width="75%">
            	<h2>Daily Progress Note</h2>
            </td>
            <td valign="top">
            	<cfselect id="progress_notes" name="progress_notes" >
                	<option value="-1">- New Progress Note -</option>
                <cfloop query="QUERIES.Notes">
                	<option value="#QUERIES.Notes.DailyProgressNoteID#"
                    <cfif url.DailyProgressNoteID eq QUERIES.Notes.DailyProgressNoteID>selected="selected"</cfif>>
                    	#dateFormat(QUERIES.Notes.NoteDate, 'mm/dd/yyyy')# - ID: #QUERIES.Notes.DailyProgressNoteID#
                    </option>
                </cfloop>
                </cfselect>
            </td>
        </tr>
    </tbody>
</table>



<table width="99%" cellpadding="2" cellspacing="2" id="daily_progress_note" >
    <tbody class="body">
    	<tr>
        	<td colspan="2" class="black_spacer">Elder Information</td>
        </tr>
        <tr>
        	<td colspan="2">
            	<!---                                                                     --->
                <table width="100%" cellpadding="2" cellspacing="2" id="daily_progress_note">
                    <tr class="white_bg">
                        <td >
                            Elder's Name:
                            <cfselect id="elder" name="elder" >
                            	<option value="-1">- Choose Elder -</option>
                            <cfset QUERIES.eldersNoContact = CreateObject("component", "cfc.queries").funcQryAllEldersNoContacts() />
                            <cfloop query="QUERIES.eldersNoContact">
                                <cfif URL.ElderID eq ELDERLISTID>
                                    <option value="#ELDERLISTID#" selected="selected">#LASTNAME#, #FIRSTNAME#</option>
                                <cfelse>
                                    <option value="#ELDERLISTID#">#LASTNAME#, #FIRSTNAME#</option>
                                </cfif>
                            </cfloop>
                            </cfselect>
                        </td>
                        <td >
            				<span style="float:left; padding:2px">Date of Birth: </span>
                			<cfinput type="text" id="dob" name="dob" disabled="disabled" size="10"
                            value="#QUERIES.elder.DOB#" />
            			</td>
                        <td >
            				<span style="float:left; padding:2px">Date of Contact:</span>
                            <cfif QUERIES.Note.NoteDate NEQ "">
            					<cfinput type="text"  id="NoteDate" name="NoteDate"
                					value="#dateFormat(QUERIES.Note.NoteDate,'mm/dd/yyyy')#" />
                            <cfelse>
                            	<cfinput type="text"  id="NoteDate" name="NoteDate"
                					value="#dateFormat(now(),'mm/dd/yyyy')#" />
                            </cfif>
           				 </td>
                    </tr>
                 </table>
     		    <!---                                                                     --->
            </td>
        </tr>
        <tr>
        	<td colspan="2">

                <table width="100%" cellpadding="2" cellspacing="2" class="white_bg" id="daily_progress_note">
                    <tr>
                       <td>
                            PA Number: <cfinput type="text" id="PANumber" name="PANumber" size="35"
                            value="#QUERIES.Note.PANumber#"/>
                        </td>
                        <td >
                            Medicare: <cfinput type="checkbox" id="Medicare" name="Medicare"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.Medicare)#"  value="1"/>
                        </td>
                        <td >
            				Medicaid: <cfinput type="checkbox" id="Medicaid" name="Medicaid"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.Medicaid)#"  value="1"/>
           				 </td>
                         <td >
            				3rd Party: <cfinput type="checkbox" id="ThirdParty" name="ThirdParty"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.ThirdParty)#"  value="1"/>
           				 </td>
                    </tr>
                 </table>

            </td>
        </tr>
        <tr>
        	<td colspan="2">
            	<table width="100%" id="daily_progress_note">

                    <tr>
                        <td colspan="2" class="black_spacer" >Billable Services</td>
                        <td class="black_spacer">Time In</td>
                        <td class="black_spacer"  >Time Out</td>
                        <td class="black_spacer">Unbilled Units</td>
                    </tr>
                    <tr  class="white_bg">
                        <td  colspan="2" >
                            <cfinput type="checkbox" name="Chore" id="Chore" checked="#UTILITIES.funcBooleanTest(QUERIES.Note.Chore)#"
                             value="1" />
                            Chore Service (housekeeping)
                        </td>
                        <td >
                            <cfinput type="text" name="ChoreTimeIn" id="ChoreTimeIn" size="7"
                            value="#TimeFormat(QUERIES.Note.ChoreTimeIn, 'h:mm tt')#" />

                        </td>
                        <td>
                            <cfinput type="text" name="ChoreTimeOut" id="ChoreTimeOut" size="7"
                            value="#TimeFormat(QUERIES.Note.ChoreTimeOut, 'h:mm tt')#"/>

                        </td>
                        <td>
                            <cfinput type="text" name="UnbilledChoreUnits" id="UnbilledChoreUnits" size="7"
                            value="#QUERIES.Note.UnbilledChoreUnits#"/>
                        </td>
                    </tr>
                    <tr  class="white_bg">
                        <td colspan="2">
                        <cfinput type="checkbox" name="DayOfCare" id="DayOfCare"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.DayOfCare)#"  value="1"/>
                            Day of Caring (preapproved)
                        </td>
                        <td>
                            <cfinput type="text" name="DayOfCareTimeIn" id="DayOfCareTimeIn" size="7"
                            value="#TimeFormat(QUERIES.Note.DayOfCareTimeIn, 'hh:mm tt')#" />

                        </td>
                        <td>
                            <cfinput type="text" name="DayOfCareTimeOut" id="DayOfCareTimeOut" size="7"
                            value="#QUERIES.Note.DayOfCareTimeOut#" />

                        </td>
                        <td>
                            <cfinput type="text" name="UnbilledDayOfCareUnits" id="UnbilledDayOfCareUnits" size="7"
                            value="#QUERIES.Note.UnbilledDayOfCareUnits#"/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <cfinput type="checkbox" name="TTCM" id="TTCM"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.TTCM)#"  value="1"/>
                            TTCM
                            <cfselect name="TTCMType">
                                <option value="HomeVisit" <cfif QUERIES.Note.TTCMType EQ 'HomeVisit'>selected='selected'</cfif>>Home Visit</option>
                                <option value="PhoneCall" <cfif QUERIES.Note.TTCMType EQ 'PhoneCall'>selected='selected'</cfif>>Phone Call</option>
                            </cfselect>
                        </td>
                        <td>
                            <cfinput type="text" name="TTCMTimeIn" id="TTCMTimeIn"  size="7"
                            value="#TimeFormat(QUERIES.Note.TTCMTimeIn, 'h:mm tt')#"/>

                         </td>
                         <td align="left">
                            <cfinput type="text" name="TTCMTimeOut" id="TTCMTimeOut"  size="7"
                            value="#TimeFormat(QUERIES.Note.TTCMTimeOut, 'h:mm tt')#" />

                         </td>
                         <td>
                            <cfinput type="text" name="UnbilledTTCMUnits" id="UnbilledTTCMUnits" size="7"
                            value="#QUERIES.Note.UnbilledTTCMUnits#"/>
                        </td>
                    </tr>
                     <tr>
                        <td colspan="2">
                            <cfinput type="checkbox" name="MedicalTransportation" id="MedicalTransportation"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.MedicalTransportation)#" value="1"/>
                            Medical Transportation
                        </td>
                        <td>&nbsp; </td>
                        <td align="left">&nbsp; </td>
                        <td>
                            <cfinput type="text" name="UnbilledMedicalTransportationUnits"
                            id="UnbilledMedicalTransportationUnits" size="7"
                            value="#QUERIES.Note.UnbilledMedicalTransportationUnits#"/>
                        </td>
                    </tr>

                </table>
            </td>
        </tr>

        <tr>
        	<td colspan="2">
            	<table width="100%" id="daily_progress_note">
                    <tr  class="white_bg">
                        <td  colspan="3">
                            Number of one way trips (round trips counts as 2)
                        </td>
                        <td colspan="2">
                            <cfinput type="text" name="MedicalTransportationTrips" id="MedicalTransportationTrips"
                            value="#QUERIES.Note.MedicalTransportationTrips#" />
                        </td>
                    </tr>
                    <tr >
                        <td colspan="3">&nbsp;</td>
                        <td class="black_spacer">Pick Up</td>
                        <td class="black_spacer">Drop Off</td>
                    </tr>
                    <tr class="white_bg">
                        <td  colspan="3">
                            Time -- First Ony Way (Pick Up and Drop Off)
                        </td>
                        <td>
                            <cfinput type="text" name="TimeFirstPickup" id="TimeFirstPickup"size="10"
                            value="#TimeFormat(QUERIES.Note.TimeFirstPickup, 'h:mm tt')#"/>

                        </td>
                        <td>
                            <cfinput type="text" name="TimeFirstDropOff" id="TimeFirstDropOff" size="10"
                            value="#TimeFormat(QUERIES.Note.TimeFirstDropOff, 'h:mm tt')#"/>

                        </td>
                    </tr>
                    <tr class="white_bg">
                        <td colspan="3">
                            Address (Pick Up and Drop Off)
                        </td>
                        <td>
                            <cftextarea id="AddressFirstPickup" name="AddressFirstPickup" cols="25">
                            #QUERIES.Note.AddressFirstPickup#
                            </cftextarea>
                        </td>
                        <td>
                            <cftextarea id="AddressFirstDropOff" name="AddressFirstDropOff" cols="25">
                            #QUERIES.Note.AddressFirstDropOff#
                            </cftextarea>
                        </td>
                    </tr>
                    <tr class="white_bg">
                        <td colspan="3">
                            Time -- Second Ony Way (Pick Up and Drop Off)
                        </td>
                        <td>
                            <cfinput type="text" name="TimeSecondPickup" id="TimeSecondPickup" size="10"
                            value="#TimeFormat(QUERIES.Note.TimeSecondPickup, 'h:mm tt')#" />

                        </td>
                        <td>
                            <cfinput type="text" name="TimeSecondDropOff" id="TimeSecondDropOff" size="10"
                            value="#TimeFormat(QUERIES.Note.TimeSecondDropOff, 'h:mm tt')#" />

                        </td>
                    </tr>
                    <tr class="white_bg">
                        <td colspan="3">
                            Address (Pick Up and Drop Off)
                        </td>
                        <td>
                            <cftextarea id="AddressSecondPickup" name="AddressSecondPickup" cols="25">
                            #QUERIES.Note.AddressSecondPickup#
                            </cftextarea>
                        </td>
                        <td>
                            <cftextarea id="AddressSecondDropOff" name="AddressSecondDropOff" cols="25">
                            #QUERIES.Note.AddressSecondDropOff#
                            </cftextarea>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>

        <tr>
        	<td  valign="top">
            	<!---                                                                     --->
                <table width="100%" cellpadding="2" cellspacing="2" class="white_bg" id="daily_progress_note">
                	<tr>
                    	<td class="black_spacer">Services</td>
                        <td class="black_spacer">Time In</td>
                        <td class="black_spacer">Time Out</td>
                    </tr>
                    <tr>
                        <td>
                            <cfinput type="checkbox" name="InHomeVisit" id="InHomeVisit"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.InHomeVisit)#"  value="1"/>
                            In-Home Visit
                        </td>
                        <td>
                            <cfinput type="text" name="InHomeVisitTimeIn" id="InHomeVisitTimeIn" size="7"
                            value="#TimeFormat(QUERIES.Note.InHomeVisitTimeIn, 'h:mm tt')#"/>


           				 </td>
                         <td align="left">
                         	<cfinput type="text" name="InHomeVisitTimeOut" id="InHomeVisitTimeOut"  size="7"
                            value="#TimeFormat(QUERIES.Note.InHomeVisitTimeOut, 'h:mm tt')#"/>

                         </td>
                    </tr>
                    <tr>
                        <td>
                            <cfinput type="checkbox" name="GroupVisit" id="GroupVisit"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.GroupVisit)#"  value="1"/>
                            Group Visit
                        </td>
                        <td>
                            <cfinput type="text" name="GroupVisitTimeIn" id="GroupVisitTimeIn"  size="7"
                            value="#TimeFormat(QUERIES.Note.GroupVisitTimeIn, 'h:mm tt')#"/>

           				 </td>
                         <td>
                         	<cfinput type="text" name="GroupVisitTimeOut" id="GroupVisitTimeOut"  size="7"
                            value="#TimeFormat(QUERIES.Note.GroupVisitTimeOut, 'h:mm tt')#"/>

                         </td>
                    </tr>
                    <tr>
                        <td>
                            <cfinput type="checkbox" name="OffSiteVisit" id="OffSiteVisit"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.OffSiteVisit)#"  value="1"/>
                            Off-Site Visit
                        </td>
                        <td>
                            <cfinput type="text" name="OffSiteVisitTimeIn" id="OffSiteVisitTimeIn"  size="7"
                            value="#TimeFormat(QUERIES.Note.OffSiteVisitTimeIn, 'h:mm tt')#"/>

           				 </td>
                         <td align="left">
                         	<cfinput type="text" name="OffSiteVisitTimeOut" id="OffSiteVisitTimeOut"  size="7"
                            value="#TimeFormat(QUERIES.Note.OffSiteVisitTimeOut, 'h:mm tt')#"/>

                         </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="LightMealPrep" id="LightMealPrep"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.LightMealPrep)#" value="1"/>
                            Light Meal Prep
                        </td>

                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="Escort" id="Escort"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.Escort)#" value="1"/>
                            Escort
                        </td>

                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="FoodAssistance" id="FoodAssistance"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.FoodAssistance)#"  value="1"/>
                            Food Assistance
                        </td>

                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="FoodBox" id="FoodBox"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.FoodBox)#"  value="1"/>
                            Food Box
                        </td>

                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="HealthPromotions" id="HealthPromotions"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.HealthPromotions)#"  value="1"/>
                            Health Promotion and Wellness
                        </td>

                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="Information" id="Information"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.Information)#"  value="1"/>
                            Information
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="InPatientVisit" id="InPatientVisit"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.InPatientVisit)#"  value="1"/>
                            In-Patient
                        </td>

                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="Interpretation" id="Interpretation"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.Interpretation)#"  value="1"/>
                            Interpretation / Translation
                        </td>

                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="MedRefillAssistance" id="MedRefillAssistance"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.MedRefillAssistance)#"  value="1"/>
                            Medication Refill Assistance
                        </td>

                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="ReferralService" id="ReferralService"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.ReferralService)#"  value="1"/>
                            Referral
                        </td>

                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="Telephoning" id="Telephoning"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.Telephoning)#"  value="1"/>
                            Telephoning
                            <cfinput type="text" name="TelephoningCount" size="10" value="#QUERIES.Note.TelephoningCount#" />
                        </td>

                    </tr>
                    <tr>
                        <td colspan="3">
                            <cfinput type="checkbox" name="WritingReading" id="WritingReading"
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.WritingReading)#"  value="1"/>
                            Writing / Reading
                        </td>

                    </tr>


                 </table>
     		    <!---                                                                     --->
            </td>
            <td valign="top"  class="white_bg">
            	<!---                                                                     --->
                <table width="100%" cellpadding="2" cellspacing="2" class="white_bg" id="daily_progress_note">
                	<tr>
                    	<td class="black_spacer" colspan="2">Family Caregiver</td>
                    </tr>
                    <tr>
                    	<td>
                            <cfinput type="checkbox" name="InformationFCSI" id="InformationFCSI" 
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.InformationFCSI)#"  value="1"/>
                            Information: FCSI
                        </td>
                        <td width="50%">
                            <cfinput type="checkbox" name="AssistanceFCSI" id="AssistanceFCSI" 
                            checked="#UTILITIES.funcBooleanTest(QUERIES.Note.AssistanceFCSI)#"  value="1"/>
                            Assistance: FCSI
                        </td>
                    </tr>
                    <tr>
                    	<td colspan="2"class="black_spacer">Transportation <small>( Number of One Way Trips )</small></td>
                    </tr>
                    <tr>
                    	<td colspan="2">
                        	<cfinput type="text" name="ActivitiesOuting" id="ActivitiesOuting"  size="7"
                            value="#QUERIES.Note.ActivitiesOuting#"/>
                            Activities and Outing
                        </td>
                    </tr>
                    <tr>
                    	<td colspan="2">
                        	<cfinput type="text" name="Banking" id="Banking"  size="7"
                            value="#QUERIES.Note.Banking#"/>
                            Banking
                        </td>
                    </tr>
                    <tr>
                    	<td colspan="2">
                        	<cfinput type="text" name="MedicationPickUp" id="MedicationPickUp"  size="7"
                            value="#QUERIES.Note.MedicationPickUp#"/>
                            Medication Pick-Up
                        </td>
                    </tr>
                    <tr>
                    	<td colspan="2">
                        	<cfinput type="text" name="OtherTransport" id="OtherTransport"  size="7"
                            value="#QUERIES.Note.OtherTransport#"/>
                            Other (Including CIHA)
                        </td>
                    </tr>
                    <tr>
                    	<td colspan="2">
                        	<cfinput type="text" name="Potluck" id="Potluck"  size="7"
                            value="#QUERIES.Note.Potluck#"/>
                            Potluck
                        </td>
                    </tr>
                    <tr>
                    	<td colspan="2">
                        	<cfinput type="text" name="Shopping" id="Shopping"  size="7"
                            value="#QUERIES.Note.Shopping#"/>
                            Shopping
                        </td>
                    </tr>
                    <tr>
                    	<td class="black_spacer" colspan="2">DNKA/Cancelation</td>
                    </tr>
                    <tr>
                  		<td width="100%" colspan="2">
                        	<div>DNKA</div>
                        	<cfinput type="checkbox" name="DNKATransportation" id="DNKATransportation" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.DNKATransportation)#"  value="1"/>
                            Transportation
                            <cfinput type="checkbox" name="DNKAHomeVisit" id="DNKAHomeVisit" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.DNKAHomeVisit)#"  value="1"/>
                            Home Visit
                            <cfinput type="checkbox" name="DNKAGroupVisit" id="DNKAGroupVisit" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.DNKAGroupVisit)#"  value="1"/>
                            Group Visit<br />
                            <cfinput type="checkbox" name="DNKATelephoning" id="DNKATelephoning" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.DNKATelephoning)#"  value="1"/>
                            Telephoning
                            <cfinput type="checkbox" name="DNKAChore" id="DNKAChore" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.DNKAChore)#"  value="1"/>
                            Chore
                            <cfinput type="checkbox" name="DNKAMealPrep" id="DNKAMealPrep" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.DNKAMealPrep)#"  value="1"/>
                            Meal Prep
                        </td>
                    </tr>
                    <tr>
                  		<td width="100%" colspan="2">&nbsp;

                        </td>
                    </tr>
                    <tr>
                    	<td width="100%" colspan="2">
                        	<div>Cancelled</div>
                        	<cfinput type="checkbox" name="CancelledTransportation" id="CancelledTransportation" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.CancelledTransportation)#"  value="1"/>
                            Transportation
                            <cfinput type="checkbox" name="CancelledHomeVisit" id="CancelledHomeVisit" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.CancelledHomeVisit)#"  value="1"/>
                            Home Visit
                            <cfinput type="checkbox" name="CancelledGroupVisit" id="CancelledGroupVisit" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.CancelledGroupVisit)#"  value="1"/>
                            Group Visit<br />
                            <cfinput type="checkbox" name="CancelledTelephoning" id="CancelledTelephoning" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.CancelledTelephoning)#"  value="1"/>
                            Telephoning
                            <cfinput type="checkbox" name="CancelledChore" id="CancelledChore" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.CancelledChore)#"  value="1"/>
                            Chore
                            <cfinput type="checkbox" name="CancelledMealPrep" id="CancelledMealPrep" 
                            	checked="#UTILITIES.funcBooleanTest(QUERIES.Note.CancelledMealPrep)#"  value="1"/>
                            Meal Prep
                        </td>
                    </tr>
                 </table>
     		    <!---                                                                     --->
            </td>
        </tr>

        <tr>
        	<td colspan="2">
            <!---                                                                     --->
                <table width="100%" cellpadding="2" cellspacing="2" class="white_bg" id="daily_progress_note">
                	<tr>
                    	<td class="black_spacer">Comments:</td>
                    </tr>
                    <tr>
                        <td >
                        	<cftextarea id="Comments" name="Comments" rows="2" >
                            #QUERIES.Note.Comments#
                            </cftextarea>
                        </td>
                    </tr>
                    <tr>
                    	<td class="black_spacer"> Follow-up:</td>
                    </tr>
                    <tr>
                        <td >
                            <cftextarea id="FollowUp" name="FollowUp" rows="2" >
                            #QUERIES.Note.FollowUp#
                            </cftextarea>
                        </td>
                    </tr>
                    <tr>
                    	<td class="black_spacer">Scheduled Appointments:</td>
                    </tr>
                    <tr>
                        <td >
                            <cftextarea id="ScheduledAppointments" name="ScheduledAppointments" rows="2" >
                             #QUERIES.Note.ScheduledAppointments#
                             </cftextarea>
                        </td>
                    </tr>
                    <tr>
                    	<td class="black_spacer">Referral:</td>
                    </tr>
                    <tr>
                        <td>
                            <cftextarea id="Referral" name="Referral" rows="2" >
                            #QUERIES.Note.Referral#
                            </cftextarea>
                        </td>
                     </tr>
                     <tr>
                    	<td class="black_spacer">Other:</td>
                    </tr>
                     <tr>
                        <td >
                            <cftextarea id="Other" name="Other" rows="2" >
                            #QUERIES.Note.Other#
                            </cftextarea>
                        </td>
                    </tr>
                 </table>
     		    <!---                                                                     --->
            </td>
        </tr>
        <tr  class="white_bg">
        	<td colspan="2" >
			<table cellpadding="2" cellspacing="2" width="98%"  id="daily_progress_note">
                	<tbody>
                    	<tr>
                            <td>
                           		<div id="StaffSignature">Staff Signature: </div>
                                <cfif QUERIES.Note.StaffSignature neq "">
                                    <cfset QUERIES.providers = CreateObject("component", "cfc.utilities").funcGetDLProviders() />
                                    <cfselect name="StaffSignature">
                                        <option value="-1" > </option>
                                        <cfloop from="1" to="#ArrayLen(QUERIES.providers)#" index="i">
                                            <option value="#QUERIES.providers[i].RosettaID#"
                                            <cfif QUERIES.Note.StaffSignature EQ  QUERIES.providers[i].RosettaID> selected='selected' </cfif> >
                                            #QUERIES.providers[i].FirstName# #QUERIES.providers[i].LastName#</option>
                                        </cfloop>
                                    </cfselect> 
                                	<cfinput type="text" id="StaffSignatureDate" name="StaffSignatureDate"
                                    value="#dateFormat(QUERIES.Note.StaffSignatureDate, 'mm/dd/yyyy')#" />

                                <cfelse>
                                    <cfset QUERIES.providers = CreateObject("component", "cfc.utilities").funcGetDLProviders() />
                                    <cfselect name="StaffSignature">
                                    	<option value="-1" > </option>
                                        <cfloop from="1" to="#ArrayLen(QUERIES.providers)#" index="i">
                                            <option value="#QUERIES.providers[i].RosettaID#"
                                            <CFIF QUERIES.Note.StaffSignature EQ  QUERIES.providers[i].RosettaID>selected='selected'</cfif> >
                                            #QUERIES.providers[i].FirstName# #QUERIES.providers[i].LastName#</option>
                                        </cfloop>
                                    </cfselect> 
                                	<cfinput type="text" id="StaffSignatureDate" name="StaffSignatureDate"
                                    value="#dateFormat(now(), 'mm/dd/yyyy')#" />
                                </cfif>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
</table>
<div>
<br />
<cfinput type="button" name="new_note" id="new_note" value="Add New DPN"  />
<cfset UTILS.supervisor = CreateObject("component", "cfc.utilities").funcIsSupervisor(CGI.AUTH_USER)/>
<cfif UTILS.supervisor.RecordCount gt 0 >
	<cfinput type="button" id="edit_note" name="edit_note"  value="Save Edited DPN" />
	<cfinput type="button" id="delete_note" name="delete_note"  value="Delete DPN" />
</cfif>
</div>

<!---this holds the logged in user for data submition.--->
<input type="hidden" id="signer" value="#CGI.AUTH_USER#" />
<input type="hidden" id="ElderStaffSignature" value="#CGI.AUTH_USER#" />

<!---this holds todays date for data submition.--->
<input type="hidden" id="sign_date" value="#dateFormat(now(),'mm/dd/yyyy')#" />
<input type="hidden" id="SignatureDate" value="#dateFormat(now(),'mm/dd/yyyy')#" />
<input type="hidden" id="NoteDate" value="#dateFormat(now(),'mm/dd/yyyy')#" />
</cfform>



<!---HTML footer, closes html and body tags.  Any footer info goes here--->
#BASE.htmlFooter()#
<!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>